import 'package:gold/generated/json/base/json_field.dart';
import 'package:gold/generated/json/customer_model.g.dart';
import 'dart:convert';
export 'package:gold/generated/json/customer_model.g.dart';

@JsonSerializable()
class CustomerModel {
	/// 用户ID
	int? uid;
	/// 手机号
	String? mobile;
	/// 头像
	String? avatar;
	/// 昵称
	String? nickname;
	/// 加入时间
	@JSONField(name: 'created_at')
	String? createdAt;
	/// 订单数
	@JSONField(name: 'order_count')
	int? orderCount;
	/// 订单总金额
	@JSONField(name: 'order_sum_pay_price')
	double? orderSumPayPrice;

	CustomerModel();

	factory CustomerModel.fromJson(Map<String, dynamic> json) => $CustomerModelFromJson(json);

	Map<String, dynamic> toJson() => $CustomerModelToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}